{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form method="post">	
                <div class="box-header with-border">
                    <span class="fa fa-pencil" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">学年学期设置</p>
                </div>
                <div class="box-body">
				<h4 class="text-center" style="margin-bottom:20px;">修改学年学期信息</h4> 
                  <div class="form-group col-md-6">
                      <label for="inputPassword3" class="col-md-3 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
                         <span style="color:red">*</span> 学年名称：
                      </label>
                      <div class="input-group col-md-8 col-sm-12 col-xs-12">
                        <input type="text" class="form-control" name="semester_xname" value="{%$semester_data.semester_xname%}">
                      </div>
                   </div>      
                   <div class="form-group col-md-6">
                      <label for="inputPassword3" class="col-md-3 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
                      		<span style="color:red">*</span>学期名称：
                      </label>
                      <div class="input-group col-md-8 col-sm-12 col-xs-12">
                          <select class="form-control" style="margin:0;" name="semester_name">
                                <option value="1"{%if $semester_data.semester_name =="1"%}selected{%/if%}> 第一学期</option>
                                <option value="2"{%if $semester_data.semester_name =="2"%}selected{%/if%}> 第二学期</option>
                          </select>
                      </div>
                   </div>      
                     <div class="form-group col-md-6">
                          <label for="inputPassword3" class="col-md-3 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
                              <span style="color:red">*</span>工作开始日期：
                          </label>
                          <div class="input-group col-md-8" >
                            <input type="text" class="form-control" value="{%$semester_data.create_time%}"   id="from" name="create_time">
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                          </div>
                       </div>      
                       <div class="form-group col-md-6">
                          <label for="inputPassword3" class="col-md-3 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
                                <span style="color:red">*</span>工作结束日期：
                          </label>
                          <div class="input-group col-md-8">
                            <input type="text" class="form-control" name="update_time" id="to" name="to" value="{%$semester_data.update_time%}" >
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                          </div>
                       </div> 
                        <div class="form-group col-md-6">
                          <label for="inputPassword3" class="col-md-3 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
                              <span style="color:red">*</span>学习开始日期：
                          </label>
                          <div class="input-group col-md-8" >
                            <input type="text" class="form-control" value="{%$semester_data.start_time%}"   id="starttime" name="start_time">
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                          </div>
                       </div>      
                       <div class="form-group col-md-6">
                          <label for="inputPassword3" class="col-md-3 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
                                <span style="color:red">*</span>学习结束日期：
                          </label>
                          <div class="input-group col-md-8">
                            <input type="text" class="form-control" value="{%$semester_data.end_time%}" id="endtime" name="end_time" >
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                          </div>
                       </div> 
				    </div><!--box-body -->
                <div class="box-footer text-center">
                    <button type="submit" class="btn btn-primary ">保 存</button>
                </div>
             </form>
           </div><!--box box-default box-solid-->
        </section>   
       </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
<script>
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
  </script>
  <script>
  $(function() {
    $( "#starttime" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#endtime" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#endtime" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#starttime" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
  </script>